require.config({
	paths : {
		'vue': '//cdn.bootcss.com/vue/1.0.26/vue.min',
		'vue-router': '//cdn.bootcss.com/vue-router/0.7.13/vue-router.min',
		'vue-resource': '//cdn.bootcss.com/vue-resource/0.9.3/vue-resource.min',
		'marked': '//cdn.bootcss.com/marked/0.3.5/marked.min'
	},
	map: {
        '*': {
            'css': '//cdn.bootcss.com/require-css/0.1.8/css.min.js',
			'text':'//cdn.bootcss.com/require-text/2.0.12/text.min.js'
        }
    },
})
require(
	['vue', 'vue-router', 'vue-resource', 'text!pages/', 'pages/list/list', 'pages/article/article', 'css!pages/index.css'],

	function(Vue, VueRouter, VueResource, Index, List, Article){
		Vue.use(VueRouter)
		Vue.use(VueResource)

		var router = new VueRouter()
		router.map({
			'/list': {
				component: List,
			},
			'/article/:id' : {
				name: 'article',
				component: Article
			}
		})
		router.redirect({
		'*': '/list'
		})

		var App = Vue.extend({
			template: Index,
			replace: false
		})
		router.start(App, 'body')
	}
)